CFLAGS := -std=gnu99 -Wall -Werror -Wno-unused-function -Wfatal-errors -D_GNU_SOURCE -flto -Os

all: forth-compiler xforth

%: %.asm $(wildcard *.inc)
	`which fasm` "$<"

%.asm: %.fth forth-compiler
	./forth-compiler "$<" "$@"

forth-compiler: forth-compiler.c

%.c: %.meta
	./meta/meta "$<" "$@"

clean:
	rm xforth *.c
